Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(playground): playground uses editor, input rendering #90

Merged
merged 7 commits into from
Aug 30, 2024

Conversation

neSpecc
Copy link
Contributor

@neSpecc neSpecc commented Aug 30, 2024

  1. Playground now visualizes Editor
image
  1. BlockToolAdapter's attachInput now renders input initial content with formatting
image
  1. Model now has getText(dataKey) method, Used for initial input value fill

  2. Core's prepareTools() now awaited before initialization

  3. FormattingAdapter formatElementContent fixed, previously it was throwing IndexSizeError

  4. v2-converter now strips tags for value

Copy link

github-actions bot commented Aug 30, 2024

Coverage report for ./packages/dom-adapters

St.
Category Percentage Covered / Total
🟢 Statements 100% 0/0
🟢 Branches 100% 0/0
🟢 Functions 100% 0/0
🟢 Lines 100% 0/0

Test suite run success

1 tests passing in 1 suite.

Report generated by 🧪jest coverage report action from 0152733

Copy link

github-actions bot commented Aug 30, 2024

Coverage report for ./packages/collaboration-manager

St.
Category Percentage Covered / Total
🟢 Statements 86.11% 62/72
🟡 Branches 62.5% 15/24
🟢 Functions 100% 10/10
🟢 Lines 86.11% 62/72

Test suite run success

6 tests passing in 1 suite.

Report generated by 🧪jest coverage report action from 0152733

Copy link

github-actions bot commented Aug 30, 2024

Coverage report for ./packages/model

St.
Category Percentage Covered / Total
🟢 Statements
96.74% (-0.22% 🔻)
800/827
🟢 Branches 98.17% 214/218
🟢 Functions
88.07% (-0.71% 🔻)
192/218
🟢 Lines
96.62% (-0.22% 🔻)
772/799
Show files with reduced coverage 🔻
St.
File Statements Branches Functions Lines
🔴 EditorJSModel.ts
35.9% (-1.94% 🔻)
0%
11.54% (-0.96% 🔻)
35.9% (-1.94% 🔻)

Test suite run success

404 tests passing in 24 suites.

Report generated by 🧪jest coverage report action from 0152733

Copy link

github-actions bot commented Aug 30, 2024

⏭️ No files to mutate for ./packages/dom-adapters

Copy link

github-actions bot commented Aug 30, 2024

⏭️ No files to mutate for ./packages/model

Comment on lines 112 to 114
if (inputTextNode === null) {
throw new Error('FormattingAdapter: input element should contain text node');
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

pass checked text node to avoid this error catching

@@ -191,6 +191,19 @@ export class BlockNode extends EventBus {
node.update(value);
}

/**
* Returns a text value of the specified text node
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Node is not specified for this function

import CaretIndex from '@/components/CaretIndex.vue';
import { BlockToolAdapter, CaretAdapter, FormattingAdapter } from '@editorjs/dom-adapters';
import { EditorDocument, EditorJSModel, EventType } from '@editorjs/model';
// import CaretIndex from '@/components/CaretIndex.vue';
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

seems redundant

@neSpecc neSpecc requested a review from e11sy August 30, 2024 23:06
@@ -191,6 +191,19 @@ export class BlockNode extends EventBus {
node.update(value);
}

/**
* Returns a text value of the specified data key
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
* Returns a text value of the specified data key
* Returns a text value of the input with specified data key

@neSpecc neSpecc added this pull request to the merge queue Aug 30, 2024
Merged via the queue into main with commit 906e7a6 Aug 30, 2024
15 checks passed
@neSpecc neSpecc deleted the playground-editor branch August 30, 2024 23:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants